import time
from ddl_platform.scheduler.job_manager import JobManager
from ddl_platform.scheduler.resource_manager import ResourceAllocatorTirasias
from ddl_platform.scheduler.resource_manager import clust
from ddl_platform.scheduler.scheduler.scheduler_base import build_scheduler


if __name__ == '__main__':

    job_manager = JobManager(host=settings.REDIS_HOST, port=settings.REDIS_PORT)
    resource_manager = ResourceAllocatorTirasias(clust)
    scheduler = build_scheduer(scheduling_job_table, r, clust)

    while True:
        job_manager.process()
        resource_manager.process()
        scheduler.process()
        time.sleep(1)

